﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

namespace UI
{
    public class UILuckCircleTemplateEight : UILuckCircleTemplateSix
    {
        public GameObject pos6;
        public GameObject pos7;

        public GameObject actvie6;
        public GameObject active7;

        public override void Actived(List<bool> light)
        {
            base.Actived(light);

            actvie6.SetActive(light[GetIndex(6)]);
            active7.SetActive(light[GetIndex(7)]);
        }

        public override Transform GetPlaced(int index)
        {
            var tr = base.GetPlaced(index);
            if (tr != null)
            {
                return tr;
            }
            else
            {
                if (index == 6) return pos6.transform;
                if (index == 7) return pos7.transform;
            }

            return null;
        }

        protected override void SortIndices()
        {
            indices[0] = 0;
            indices[1] = 4;
            indices[2] = 6;
            indices[3] = 2;
            indices[4] = 7;
            indices[5] = 5;
            indices[6] = 1;
            indices[7] = 3;
        }
    }
}
